if modifier_ball_lightning == nil then
    modifier_ball_lightning = class({})
end

function modifier_ball_lightning:OnCreated()
	if IsServer() then
		local caster = self:GetParent()
		self.partID = ParticleManager:CreateParticle("particles/units/heroes/hero_stormspirit/stormspirit_ball_lightning.vpcf",PATTACH_CUSTOMORIGIN_FOLLOW ,caster)
		ParticleManager:SetParticleControlEnt(self.partID, 0, caster, PATTACH_POINT_FOLLOW, "attach_hitloc", caster:GetAbsOrigin(), true)
		ParticleManager:SetParticleControlEnt(self.partID, 1, caster, PATTACH_POINT_FOLLOW, "attach_hitloc", caster:GetAbsOrigin(), true)
	end
end

function modifier_ball_lightning:IsHidden()
	return true
end

function modifier_ball_lightning:OnDestroy()
	if IsServer() then
		ParticleManager:DestroyParticle(self.partID, false)
	end
end

function modifier_ball_lightning:CheckState()
	local state = {
		[MODIFIER_STATE_NO_HEALTH_BAR] = true,
		[MODIFIER_STATE_NO_UNIT_COLLISION] = true,
	}

	return state
end
